{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "fc4ab4a3",
   "metadata": {},
   "source": [
    "# LaTeX数学公式\n",
    "\n",
    "## 1. 行内公式\n",
    "\n",
    "\n",
    "$ f(x) = a+b $\n",
    "\n",
    "\n",
    "\n",
    "## 2.行间公式\n",
    "\n",
    "\n",
    "\n",
    "$$ f(x) = a+b $$\n",
    "\n",
    "\n",
    "\n",
    "## 3.简单运算\n",
    "\n",
    "+   +-*/=  直接输入\n",
    "+ \\cdot  `点乘法`\n",
    "+ \\neq `不等号`\n",
    "+ \\equiv `恒等于`\n",
    "+ \\bmod `取模`\n",
    "\n",
    "\n",
    "\n",
    "## 4.上下标\n",
    "\n",
    "+ 语法_表示下标、^表示上标\n",
    "\n",
    "+ 当上下标不只一个时， 用大括号括起来\n",
    "\n",
    "    $a_{ij}^{2} + b^3_{2}=x^{t} + y' + x''_{12}$\n",
    "\n",
    "\n",
    "\n",
    "## 5.根号、分式\n",
    "\n",
    "\\sqrt表示平方根，\\sqrt[n]表示n次方根，\\frac{A}{B}表示分式\n",
    "\n",
    "\n",
    "\n",
    "$$\\sqrt{x} + \\sqrt{x^{2}+\\sqrt{y}} = \\sqrt[3]{k_{i}} - \\frac{x}{m}$$\n",
    "\n",
    "\n",
    "\n",
    "## 6.下标记\n",
    "\n",
    "\\overline, \\underline 分别在表达式上、下方画出水平线\n",
    "\n",
    "$$\\overline{x+y} \\qquad \\underline{a+b}$$\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\\overbrace, \\underbrace 分别在表达式上、下方给出一个水平的大括号\n",
    "\n",
    "$$\\overbrace{1+2+\\cdots+n}^{n个} \\qquad \\underbrace{a+b+\\cdots+z}_{26}$$\n",
    "\n",
    "## 7.向量\n",
    "\n",
    "\\vec表示向量，\\overrightarrow表示箭头向右的向量，\\overleftarrow表示箭头向左的向量\n",
    "\n",
    "$$\\vec{a} + \\overrightarrow{AB} + \\overleftarrow{DE}$$\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "## 8.积分、极限、求和、乘积\n",
    "\n",
    "\\int表示积分，\\lim表示极限， \\sum表示求和，\\prod表示乘积，^、_表示上、下限\n",
    "\n",
    "$$\\lim_{x \\to \\infty} x^2_{22} - \\int_{1}^{5}x\\mathrm{d}x + \\sum_{n=1}^{20} n^{2} = \\prod_{j=1}^{3} y_{j}  + \\lim_{x \\to -2} \\frac{x-2}{x} $$\n",
    "\n",
    "\n",
    "\n",
    "## 9.三圆点\n",
    "\n",
    "\\ldots点位于基线上，\\cdots点设置为居中，\\vdots使其垂直，\\ddots对角线排列\n",
    "\n",
    "$$x_{1},x_{2},\\ldots,x_{5}  \\quad x_{1} + x_{2} + \\cdots + x_{n} $$\n",
    "\n",
    "## 10.重音符号\n",
    "\n",
    "常用命令如下： \\hat{x} `估计值`  \\bar{x}`平均值`   \\tilde{x} `波浪线`\n",
    "\n",
    "$ \\hat{x} $\n",
    "\n",
    "$ \\bar{x} $\n",
    "\n",
    "$ \\tilde{x} $\n",
    "\n",
    "\n",
    "\n",
    "## 11.矩阵\n",
    "\n",
    "下列代码中，&用于分隔列，\\用于分隔行\n",
    "\n",
    "$$\\begin{bmatrix}\n",
    "1 & 2 & \\cdots \\\\\n",
    "67 & 95 & \\cdots \\\\\n",
    "\\vdots  & \\vdots & \\ddots \\\\\n",
    "\\end{bmatrix}$$\n",
    "\n",
    "\n",
    "\n",
    "## 12.希腊字母\n",
    "\n",
    "希腊字母无法直接通过美式键盘输入获得。在LaTeX中通过反斜杠\\加上其字母读音实现，将读音首字母大写即可输入其大写形式，详见下表\n",
    "\n",
    "$$ \\alpha^{2} + \\beta = \\Theta  $$\n",
    "\n",
    "![img](https://pic1.zhimg.com/80/v2-da3e717cf670582fbfbdddee33073524_720w.jpg)\n",
    "\n",
    "## 13.多行公式\n",
    "\n",
    "**公式组合**\n",
    "\n",
    "通过cases环境实现公式的组合，&分隔公式和条件，还可以通过\\limits来让x→0位于lim的正下方而非默认在lim符号的右下方显示\n",
    "\n",
    "\\begin{cases}\n",
    "\\lim\\limits_{x \\to 0} \\frac{a^x}{b+c}, & x<3 \\\\\n",
    "\\pi, & x=3 \\\\\n",
    "\\int_a^{3b}x_{ij}+e^2 \\mathrm{d}x,& x>3 \\\\\n",
    "\\end{cases}\n",
    "\n",
    "\n",
    "**拆分单个公式**\n",
    "\n",
    "通过split环境实现公式拆分\n",
    "\n",
    "$$\\begin{split}\n",
    "\\cos 2x &= \\cos^2x - \\sin^2x \\\\\n",
    "&=2\\cos^2x-1\n",
    "\\end{split}$$\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "```python\n",
    "\n",
    "```\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
